package org.text2diagram.ddl.converter.dot;

import org.text2diagram.ddl.domain.Appearance;

/**
 * Shape name representing node as supported by GraphViz
 * 
 * @author Svyatoslav Kryukov 
 */
public enum Shape {
	
	BOX, 
	POLYGON, 
	ELLIPSE, 
	POINT, 
	EGG, 
	TRIANGLE, 
	DIAMOND, 
	TRAPEZIUM, 
	PARALLELOGRAM, 
	HEXAGON, 
	OCTAGON, 
	DOUBLECIRCLE, 
	TRIPLEOCTAGON, 
	INVTRIANGLE, 
	INVTRAPEZIUM; 
	
	/**
	 * Converts DDL's Appearance into Shape description supported by GraphViz
	 * At this stage these are equal so no real conversion required
	 * @param appearance
	 * @return
	 */
	public static Shape convert(Appearance appearance) {
		return Shape.valueOf(appearance.name());
	}

}
